class Cat:
    def __init__(self, name):
        self.name = name

     # 类方法
    @classmethod
    def speak(cls):
        print('miao miao')

    # 静态方法通过类和对象调用
    @staticmethod
    def hello():
        print('hello')

    def miao(self):
        print('miao-----')

cat = Cat('小白')
print(cat.name)
cat.miao()
# 不能通过类名调实例属性  AttributeError
# print(Cat.name)
# 实例方法只能通过对象来调
# TypeError: Cat.miao() missing 1 required positional argument: 'self'
# Cat.miao()
Cat.speak()

